package cn.hk.vaccination.mapper;

import cn.hk.vaccination.domain.SubscribeInfo;
import cn.hk.vaccination.domain.vo.OrderRecorderVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 * 预约信息表 Mapper 接口
 * </p>
 *
 * @author xu
 * @since 2023-03-12
 */
@DataSource(DataSourceType.KELIN)
public interface SubscribeInfoMapper extends BaseMapper<SubscribeInfo> {
    boolean insertOne(SubscribeInfo subscribeInfo);

    List<SubscribeInfo> selectListByUserId(@Param("userId") Long userId);

    List<SubscribeInfo> selectToDoListByUserId(@Param("userId")Long userId);

    Boolean signIn(@Param("id")Long id);

    Boolean cancelOder(@Param("id")Long id);

    List<OrderRecorderVo> selectOrderRecorderListByUserId(@Param("userId")Long userId);

    List<String> selectSubscribeCodeListByDeptIdAndSubscribeTime(@Param("deptId")Long deptId,@Param("subscribeTime") String subscribeTime);

    SubscribeInfo selectOneById(Long id);
}
